<ion-header>

    <ion-navbar color="orange">
        <ion-title>论坛</ion-title>
    </ion-navbar>

</ion-header>


<ion-content>
    <!-- banner开始 -->
    <div class="ht-100 ht-overflow s-banner">
        <img src="assets/imgs/service-banner.png" alt="">
    </div>
    <!-- banner结束 -->
    <div class="ht-margin-bottom ht-background ht-overflow" padding-top *ngFor="let info of infolist;let i=index;">
        <p padding-left padding-right class="ht-font-14 ht-000 ht-line-25"><!-- [navPush]="'ArticleDetailPage'" [navParams]="{id:info.amoy_id}"-->
            {{info.auto_content}}
        </p>
        <div padding-left padding-right class="flex flex-wrap margin-top-5" *ngIf="info.cover && info.cover.length">
            <div class="pic-box" *ngFor="let pic of info.cover; let m=index;">
                <img [src]="util.parseImageUrl(pic)" alt="" (click)="util.imageSlide(info.cover, m)">
            </div>
        </div>
        <div class="flex flex-align-center margin-top-5" padding-left padding-right>
            <img [src]="util.parseImageUrl(info.head_img)" alt="" class="c-tx">
            <div class="margin-left-5">{{info.nickname}}</div>
        </div>
        <div class="ht-100 ht-overflow ht-border-bottom margin-top-5" padding-bottom padding-left padding-right>
            <div class="ht-overflow ht-padding-tb5 ht-999">
                <div class="ht-overflow flex flex-align-center flex-line-between">
                    <div class="ht-padding-l5">{{info.time_quantum}}</div>
                    <div class="flex flex-line-end">
                        <!--<div class="ht-padding-l5 margin-left-5">-->
                            <!--&lt;!&ndash;<img src="assets/imgs/icon-fx.png" alt="" class="c-icon">&ndash;&gt;-->
                            <!--<span><i class="fa fa-share-square"></i> 100</span>-->
                        <!--</div>-->
                        <div class="ht-padding-l5 margin-left-5" (click)="reply.showComment(info.amoy_id,{user_id: 0, nick_name: '', reply_id: 0},i)">
                            <!--<img src="assets/imgs/icon-pl.png" alt="" class="c-icon">-->
                            <span><i class="far fa-comment"></i> 评论</span>
                        </div>
                        <div class="ht-padding-l5 margin-left-5" (click)="like(i,info.amoy_id)">
                            <!--<img src="assets/imgs/icon-z.png" alt="" class="c-icon">-->
                            <span [ngClass]="{'text-zan': info.has_zan}"><i class="far fa-heart"></i> 赞</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="zan-comment">
                <div class="zan-list text-zan" *ngIf="info['zan'].length">
                    <i class="far fa-heart" style="font-size:12px;"></i> {{info['zan'].join(', ')}}
                </div>
                <div class="msg-list margin-top-5" *ngIf="info.comment.total > 0">
                    <div class="msg-item" *ngFor="let comment of info.comment['lists']">
                        <p (click)="reply.showComment(info.amoy_id, {user_id:comment['user_id'], nick_name: comment['nickname'], reply_id: comment['id']}, i)"><span class="text-msg">{{comment['nickname']}}</span>：{{comment['content']}}</p>
                        <div class="sub-comment" *ngIf="comment['child'] && comment['child'].length">
                            <p *ngFor="let child of comment['child']" (click)="reply.showComment(info.amoy_id, {user_id:child['user_id'], nick_name: child['u_name'], reply_id: comment['id']}, i)">
                                <span class="text-zan">{{child['u_name']}}</span><span>回复<span class="text-zan">{{child['p_name']}}</span>：{{child['content']}}</span>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
        <ion-infinite-scroll-content></ion-infinite-scroll-content>
    </ion-infinite-scroll>

    <!--发布按钮-->
    <div style="position:fixed;right:5px;bottom:45px;width:50px;height:50px;border-radius:50%;background:#f29700;border:1px solid #fff;box-shadow: #ccc 1px 1px;" [navPush]="'CommunityEditPage'">
        <span style="font-size:50px;color:#fff;display:block;text-align:center;line-height:50px;">+</span>
    </div>
</ion-content>
<comment #reply [showType]="false" (outer)="sendMsgSuccess($event)"></comment>